package com.share.example.selenium.web;

import com.share.common.common.Result;
import com.share.example.selenium.service.hzhc.dingding.HcxxDingDingService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/hzhc/dingding")
public class HzhcDingDingController {

    @Autowired
    private HcxxDingDingService hcxxDingDingService;

    @RequestMapping("/open/login/page")
    public Result openLoginPage() {
        return Result.bool(hcxxDingDingService.openLoginPage());
    }

    @RequestMapping("/allTask")
    public Result allTask() {
        return Result.bool(hcxxDingDingService.taskAll());
    }

    @RequestMapping("/bofang")
    public Result bofang() {
        Integer bofang = hcxxDingDingService.bofang();
        return Result.bool(bofang != null && bofang > 0);
    }
}
